package cn.com.demo.microservice.feign.controller;

import cn.com.demo.microservice.entity.User;
import cn.com.demo.microservice.feign.feignservice.IProvider3Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.ws.rs.Path;

@RestController
@RequestMapping("/feign")
public class FeignController {
    @Autowired
    private IProvider3Service provider3Service;
    @GetMapping("/hello/{name}")
    public String hello(@PathVariable("name") String name){
        String result = this.provider3Service.hello(name);
        return result;
    }
    @PostMapping("/user")
    public User testUser(@RequestBody User user){
        return this.provider3Service.user(user);
    }
}
